package com.example.demo.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.example.demo.dao.UserDao;
import com.example.demo.entity.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class SpringbootService {
    @Autowired
    private UserDao userdao;

    public List<User> selectAll(int page,int limit) {
        return userdao.selectAll(page,limit);
    }

    public int count() {
        return userdao.count();
    }

    public  int update(User user){
        return userdao.updateById(user);
    }
    public User selectOne(int id){
        return userdao.selectById(id);
    }
}
